#include<stdio.h>
#include<stdlib.h>

int main()
{
    int i,j, k, n;
    for (n = 100; n < 1000; n++)
    {
        i = n / 100;
	    j = (n - i * 100) / 10;
        k = n % 10;
	    if (n == i * i * i + j * j * j + k * k * k)
		printf("%6d", n);
    }
    printf("\n");
    
    system("pause");
    return 0;
}